<?php
class configsModel extends Model{
	private $tb = 'configs';

	public function __construct(){
		parent::__construct($this->tb);
	}

	public function add_configs($data){
		if( empty($data['prop']) || empty($data['value']) ){
			return $this->error(lang(array('required_fields','required')));
		}
		return $this->value($data)->add();
	}

	public function get_configs($config_name){
		return $this->where("prop='$config_name'")->get_one();	
	}
}
